package com.thoughtworks;

public class RenderThirty extends Render {

    public RenderThirty(String orderDetails, int originalPrice, int finalPrice, String[] ids, int[] numbers){
        super(orderDetails, originalPrice, finalPrice, ids, numbers);
        this.orderDetails = orderDetails;
        this.finalPrice = finalPrice;
        this.originalPrice = originalPrice;
        this.ids = ids;
        this.numbers = numbers;
    }

    public String renderApplication() {
        orderDetails += "使用优惠:\n"
                + "满30减6元，省6元\n"
                + "-----------------------------------\n"
                + "总计：" + finalPrice +"元\n"
                + "===================================";
        return orderDetails;
    }
}
